package demo.interfaces;

public class InterfaceClass {
	public static void main(String[] agrs)
	{
		interfaceA iteA = new Demo1();
		iteA.printA();
		interfaceA iteB = new Demo2();
		iteB.printA();
	}
}

interface interfaceA
{
	int a = 0;
	public void printA();
}

interface interfaceB
{
	int b = 1;
	public void printB();
}

interface interfaceC
{
	int c = 2;
	public void printC();
}

class Demo1 implements interfaceA
{

	@Override
	public void printA() {
		System.out.println(a);
	}
	
}

class Demo2 extends Demo1 implements interfaceB, interfaceC
{

	@Override
	public void printC() {
		System.out.println(b);
		
	}

	@Override
	public void printB() {
		System.out.println(c);
	}
	@Override
	public void printA() {
		System.out.println("adds");
		super.printA();
	}
	
}